package com.breakfast.fun.ui.user.order;

import com.breakfast.fun.data.entity.mall.MallOrderDetail;
import com.breakfast.fun.data.entity.user.Result;
import com.breakfast.fun.data.entity.user.recharge.RechargeMoney;
import com.breakfast.fun.util.Api;
import com.breakfast.fun.util.RxSchedulers;

import java.util.Map;

import retrofit2.http.FieldMap;
import rx.Observable;

/**
 * Created by yukai on 16/10/5.
 */

public class MallOrderDetailModel implements MallOrderDetailContract.Model {
    @Override
    public Observable<MallOrderDetail> getOrderInfoModel(@FieldMap Map<String, String> map) {
        return Api.getInstance().service
                .getMallOrderDetailModel(map)
                .compose(RxSchedulers.io_main());
    }

    @Override
    public Observable<RechargeMoney> getPayBeanModel(@FieldMap Map<String, String> map) {
        return Api.getInstance().service
                .getPayBeanModel(map)
                .compose(RxSchedulers.io_main());
    }

    @Override
    public Observable<Result> getOrderCancelModel(@FieldMap Map<String, String> map) {
        return Api.getInstance().service
                .getMallOrderCancelModel(map)
                .compose(RxSchedulers.io_main());
    }
}
